home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
BASIC
/
1381.ZIP
/
WINDOW.DOC
< prev
next >
Wrap
Text File
|
1988-08-02
|
8KB
|
249 lines
QUICKSUBS LIBRARY
FOR QUICKBASIC 4.0
WITH WINDOWS
David C. Dilbeck
Data Processing & Management Solutions, Inc.
COPYRIGHT NOTICE
This software package and documentation are copyrighted (C)1988 by
Data Processing and Management Solutions, Inc., hereafter called DPMS, Inc.
All rights are reserved worldwide.
DPMS, Inc.
P.O. Box 931
Harrogate, TN 37752
SINGLE COMPUTER LICENSE
The price paid for one copy of QUICKLIBS licenses you to install and use
the produc on only one computer at a time. You may remove it from that
one computer and install it on anouther, but at no time are you allowed
to make multiple copies available for others to use. If you intall the
product on a network or in some other way that allows it to be used by
others, you must first obtain a multi-user license from DPMS, Inc.
S H A R E W A R E N O T I C E
================================
SHAREWARE user-supported software is an method in distributing computer
programs, based on three principles:
First, that the value and utility of software is best assessed by the user
on his/her own system. Only after using a program can one really determine
whether it serves personal applications, needs, and tastes.
Second, that the creation of independent personal computer software can and
should be supported by the computing community.
Finally, that copying of programs should be encouraged, rather than restricted.
The ease with which software can be distributed outside traditional commercial
channels reflects the strength, rather than the weakness, of electronic
information.
The user-supported concept:
Anyone may request a copy of a user-supported program by sending a blank,
formated disk to the program author with an addressed, postage-paid return
mailer. A copy of the program, with documentation on disk, will be sent by
return mail on the user's disk.
The program carries a notice suggesting a contribution for the program.
Making a contribution is voluntary on the part of the user. The program
may also by ordered by mail for an advance contribution.
If you have received this program from another user and find it of value,
your $35.00 contribution will be appreciated. When we receive the
contribution we will then at your name to the list of registraed users,
and as such you will receive a update to your program diskette, so that
it is not limited in any way. The shareware version of these programs
and routines do have a single limitation, called a date stamp. The date
stamp reads the system date and compares it to the date stamp on the
internal programs, if the system date is greater, the programs will not
fuction at all. So if you find these program useful, please send in the
contribution, it is such a small price to pay for the great stuff you
receive from us.
DISCLAIMER
DPMS, Inc. makes no warranties as to the contents of this manual and
specifically disclaims any implied warranties of merchantability or
fitness for any particular purpose. DPMS, Inc. further reserves the
right to make changes to the specifications of the program and contents
of the manual without obligation to notify any person or organization of
such changes.
PREFACE
This manual is directed at programmers who develop software for
the various models of the IBM Personal Computer (PC), and compatibles.
This manual illustrates techniques for effective user-interface design.
Its main objective is to help programmers design programs that are easy
for operators to learn and use, and are subject to minimally operator errors.
It other words, this is a manual on how to design "user-friendly" programs.
The manual assumes that you have a system with at least two disk drives,
an minimum of 340 kilobytes of randow-access memory, , a monitor, a CGA
card, and QuickBASIC 4.0.
In the pages to follow you will learn the basic design aids for screen
and window displays, index files, custom input routines, and various
other sample programs and routine examples to allow you to write a truly
"user-friendly" system.
You will notice that some of the functions, sub-programs, etc. are listed
more than once. This is because that a few of the functions from one library
are in the other also. They do however work the same.
Center$
PURPOSE
To center a string of text between two points
SUMMARY
Center$ (PASSED.DATA$, LENGTH AS INTEGER)
RETURN
The string centered between the two points
EXAMPLE
100 'SETUP AN EXAMPLE PROGRAM FOR THE CENTER$ FUNCTION
NA$ = "DAVID"
LEG% = 20
200 PRINT CENTER$(NA$,LEG%)
300 END
CloseWindow
PURPOSE
To close the open window on the screen. This routine also restores the
first screen, and the cursor locations.
SUMMARY
CALL CloseWindow (int1, int2)
RETURN
The first screen, with the cursor positions intact.
EXAMPLE
100 'PROGRAM TO CLOSE A WINDOW & RESTORE FIRST SCREEN
CALL CloseWindow(CurRow%, CurCol%)
200 END
Format$
PURPOSE
To arrange numric data into any format wanted.
SUMMARY
X$ = Format$(MASK$, PASSED.NUMBER AS DOUBLE)
RETURN
This fuction returns a string with the mask and the number merged together.
EXAMPLE
100 'SAMPLE PROGRAM USING THE FORMAT$ FUNCTION
mask$ = "XXX-XX-XXXX"
ss# = 409314359
sso$ = Format$(mask$,ss#)
200 PRINT sso$
300 END
The output from the above program would be:
409-31-4359
Loop.For.Enter
PURPOSE
This subprogram just puts the CPU into a loop until the enter
key (CHR$(13)) is pressed.
SUMMARY
CALL Loop.For.Enter
RETURN
There is no return value for this routine
EXAMPLE
100 'THIS AN EXAMPLE PROGRAM USING THE LOOP.FOR.ENTER ROUTINE
CALL Loop.For.Enter
200 END
NumricInput
PURPOSE
Get numric input from the keyboard
SUMMARY
CALL NumricInput(Row%, Column%, Length%, Dec%)
RETURN
A numric value stored in the string varible sa$, must be converted
to numric varible using the following example.
EXAMPLE
100 'Program to show the use of the NumricInput sub-program
200 CALL NumricInput(5,10,5,2)
amount#=val(SA$)
300 END
OpenWindow
PURPOSE
To open a window of any size, color, and location on the CRT.
Before opening the window the first screen is saved into high memory.
SUMMARY
CALL OpenWindow (BegRow%, BegCol%, HowLong%, HowWide%, ForGround%,
BackGround%, TITLE$)
RETURN
A window on the CRT, which may be written to by use of the LOCATE,
and PRINT commands.
EXAMPLE
100 'Example program showes the OpenWindow sub-program
TITLE$ = "Sample Window Program"
200 CALL OpenWindow (5,10,10,40,2,7,TITLE$)
CALL Loop.For.Enter
CALL CloseWindow (CurRow%, CurCol%)
300 END
PhoneInput
PURPOSE
To enter a number into a string, and convert it the telephone number format.
SUMMARY
CALL PhoneInput (Row%, Column%, Lenght%, SA$)
RETURN
The phone number in the correct format, stored in a tempary varible SA$
EXAMPLE
100 'Example program showing the use of the PhoneInput function
200 CALL PhoneInut (5,5,10,SA$)
phone$ = sa$
300 END
StringInput
PURPOSE
To allow string data to be entered into a varible in a controlled manner.
SUMMARY
CALL StringInput ( Row%, Column%, Length%, SA$)
RETURN
This function also returns a tempary varible called SA$, which
needs to be reassigned to the correct varible name.
EXAMPLE
100 'Example program showing the use of StringInput
200 CALL StringInput (5,5,20,SA$)
address$ = sa$
300 END